<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>

  </body>
<script type="text/javascript">
    //原始代码，要看看这个
    //https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7bce1d25e600dbfe&redirect_uri=http%3a%2f%2fb77b5845.ngrok.io&response_type=code&scope=snsapi_base&state=123#wechat_redirect
    var param = location.href.substr(location.href.indexOf("url=") + 4);
    param = decodeURIComponent(param);
    var aouthUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7bce1d25e600dbfe&redirect_uri=[uri]&response_type=code&scope=snsapi_base&state=123#wechat_redirect";
    aouthUrl = aouthUrl.replace("[uri]", encodeURIComponent("http://b77b5845.ngrok.io"));
    window.location.href = aouthUrl;
</script>
</html>
